package com.ck.mybatis.plus.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.ck.mybatis.plus.entity.User;
import com.ck.mybatis.plus.entity.dto.UserPageDTO;
import com.ck.mybatis.plus.entity.vo.UserPageVO;
import org.apache.ibatis.annotations.Param;

/**
 * @Classname UserMapper
 * @Description mapper类
 * @Date 2020/7/11 13:57
 * @Created by lpc
 */
public interface UserMapper extends BaseMapper<User> {

    /**
     * 单表多个条件查询user
     * @param page
     * @param queryWrapper
     * @author jiangqingpeng
     * @return
     */
    IPage<UserPageVO> pageWhere(IPage<UserPageDTO> page,
                                @Param(Constants.WRAPPER) Wrapper queryWrapper);


    /**
     * 多表联合多个条件查询user
     * @param page
     * @param queryWrapper
     * @author jiangqingpeng
     * @return
     */
    IPage<UserPageVO> pageJoinWhere(IPage<UserPageDTO> page,
                                    @Param(Constants.WRAPPER) Wrapper queryWrapper);
}
